<template>
    <div class="my-apps">
        <CardList
            ref="appList"
            :listType="1"
            :menuList="menuList" 
            :pageSize="20"
        />
          <appInfo ref="appInfo" /> 
          <changeOwnerApp ref="changeOwnerApp" @change="$refs.appList.getData(1)"/>
    </div>
</template>

<script>
import CardList from "@/components/CardList.vue"
import appInfo from "../components/appInfo.vue"
import changeOwnerApp from "../components/changeOwnerApp.vue"

export default {
    name: "orgApps",
    components: {
      CardList,
      appInfo,
      changeOwnerApp
    },
    computed: {},
    data(){
        const accountAdmin = this.$store.state.user.userInfo.accountAdmin
        return {
            isManage:accountAdmin,
            queryName:'',
            menuList:[
                {   icon:"vcloud-Modifyowner",
                    name:"修改所属人",
                    group:'1',
                    callback:data=>{
                        this.$refs.changeOwnerApp.open(data)
                    }
                },
                {
                    icon:"vcloud-yingyongshuxing",
                    name:"应用属性",
                    group:'5',
                    callback:(data)=>{
                        this.$refs.appInfo.open(data)
                    }
                }
              ],
            
        }
    },
    created() {
       if(!this.isManage) this.menuList.shift()
    },
    mounted() {},
    watch: {
    },
    methods: {
    }
};
</script>

<style lang="scss" scoped>
  .my-apps{
    height: calc(100% - 76px);
  }
</style>